package com.lhb;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * @Program: spring
 * @Description:
 * @Author: LHB
 * @Version: v0.0.1
 * @Time: 2021-08-05 12:56
 **/
@Component
@Scope("prototype")
public class InstanceA implements IApi{
	@Autowired
	private InstanceB instanceB;

	public InstanceB getInstanceB() {
		return instanceB;
	}

	public void setInstanceB(InstanceB instanceB) {
		this.instanceB = instanceB;
	}

	public InstanceA(InstanceB instanceB) {
		this.instanceB = instanceB;
	}


	public InstanceA() {
		System.out.println("InstanceA实例化");
	}

	@Override
	public void say() {
		System.out.println("I'm A");
	}
}
